<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\WechatUser
 *
 * @property integer $id
 * @property integer $user_id
 * @property string $user_password
 * @property string $openid
 * @property string $nickname
 * @property string $sex
 * @property string $city
 * @property string $province
 * @property string $country
 * @property string $headimgurl
 * @property string $deleted_at
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 * @property string $edit_at
 * @property-read User $user
 * @method static \Illuminate\Database\Query\Builder|\App\WechatUser whereId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\WechatUser whereUserId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\WechatUser whereUserPassword($value)
 * @method static \Illuminate\Database\Query\Builder|\App\WechatUser whereOpenid($value)
 * @method static \Illuminate\Database\Query\Builder|\App\WechatUser whereNickname($value)
 * @method static \Illuminate\Database\Query\Builder|\App\WechatUser whereSex($value)
 * @method static \Illuminate\Database\Query\Builder|\App\WechatUser whereCity($value)
 * @method static \Illuminate\Database\Query\Builder|\App\WechatUser whereProvince($value)
 * @method static \Illuminate\Database\Query\Builder|\App\WechatUser whereCountry($value)
 * @method static \Illuminate\Database\Query\Builder|\App\WechatUser whereHeadimgurl($value)
 * @method static \Illuminate\Database\Query\Builder|\App\WechatUser whereDeletedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\WechatUser whereCreatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\WechatUser whereUpdatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\WechatUser whereEditAt($value)
 */
class WechatUser extends Model
{
    //
    protected $guarded = [];
    //protected $fillable = ['openid','nickname', 'sex', 'city', 'province', 'country', 'headimgurl','user_id','user_password'];

    public function user()
    {
        return $this->belongsTo(User::class, 'user_id');
    }
}
